<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    let person = { name: 'zhangsan', age: 20 };
    let { name, age } = person;   // 解构赋值
    console.log(name);            // zhangsan
    console.log(age);             // 20
  </script>
</body>
</html>